package main

import (
	"errors"
	"fmt"
)

func main() {
	_, err := Div(100, 0)
	if err != nil {
		fmt.Println("error happened.", err.Error())
	}
}

func Div(a, b int) (float64, error) {
	if b == 0 {
		return 0, errors.New("can not zero")
	}
	return float64(a / b), nil
}
